<?php
session_start();
?>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<script src="js/jquery.js"></script>
<script>
$(function() {
    $( document ).tooltip({
      track: true
    });
	
	$("[title]").each(function(){
    $(this).tooltip({ content: $(this).attr("title")});
});    // It allows html content to tooltip.
  });
function ajaxlist(){
	$.ajax({
		type:'POST',
		url:'list_product2.php',
		data:$('#frmsearch').serialize(),
		success:function(msg){
			$("#listspan").html(msg);
			}
				});//ajax
	}//ajaxlist
	function ajaxmanage(pagetype,temp){
		if(pagetype==1||pagetype==3){
			if(pagetype==1){
		$.ajax({
		type:'POST',
		url:'manage_product.php',
		data:'temp='+temp+'&type='+pagetype,
		success: function(msg){
		$("#listspan").html(msg);
		}
		});}//ajax
		
		if(pagetype==3){
		$.ajax({
		type:'POST',
		url:'manage_product.php',
		data:$("#fromInsert_Pro").serialize()+'&temp='+temp+'&type='+pagetype,
		success: function(msg){
		$("#listspan").html(msg);
		}
		});}
		}//if
		else if(pagetype==2){
		$.ajax({
		type:'POST',
		url:'update_product.php',
		data:'temp='+temp,
		success: function(msg){
		$("#listspan").html(msg);
		}
		});//ajax
		}//else if
		else if(pagetype==4){
		$.ajax({
		type:'POST',
		url:'insert_product.php',
		success: function(msg){
		$("#listspan").html(msg);
		}
		});//ajax
		}//else if
			else if(pagetype==6){
		$.ajax({
		type:'POST',
		url:'insert_add_material.php',
		data:'temp='+temp,
		success: function(msg){
			
		$("#listspan").html(msg);
		}
		});//ajax
		}//else if
	}//ajaxmanage
</script>
<script>
	function submitPro(){
	$.ajax({
			type:"POST",
			url:"insert_product2.php",
			data:$("#fromInsert_Pro").serialize(),
			success: function(msg){
				$("#listspan").html(msg);
				}
			});//ajax
	}
	
</script>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Home | Nova</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">

    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/bootstrap-responsive.min.css">
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <link rel="stylesheet" href="css/main.css">
    <link rel="stylesheet" href="css/sl-slide.css">
 <link rel="stylesheet" href="css/csstb.css">
    <script src="js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
     <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="images/ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="images/ico/apple-touch-icon-57-precomposed.png">
</head>

<body>

    <!--Header-->
    <?php
include("header.php");
?>
    <!-- /header -->
<div><p><br><br></p>
    <!--Slider-->
    <section id="slide-show">
     <section id="recent-works">
    <div class="container">
        <div class="center">
            <h2>สินค้า</h2>
          
          
      </div>  
        <div class="gap"></div>
    <form id="frmsearch" name="frmsearch" action="Javascript:ajaxlist();">
  <label for="textfield" title="เพิ่มข้อมูลสินค้า"><a href="Javascript:ajaxmanage(4,'');"><img src="images/ico/ico_product.png" width="40px"></a><br />
  </label>
  กรอกคำค้นหาจากชื่อสินค้า :
  <input type="text" name="txtsearch" id="txtsearch" />
  
   <input type="submit" name="button" id="button" value="ค้นหา" />
</form>
<div id="listspan"></div></div>

</section>
<!-- /slider-wrapper -->           
</section>
</div>
<!--/Slider--><!--Bottom-->

<!--/bottom-->

<!--Footer-->
<footer id="footer">
    <div class="container">
        <div class="row-fluid">
            <div class="span5 cp">
                &copy; 2014Copyright © <a href="http://krabueng-pyk.com/" title="P Y K (ผู้ใหญ่เกา) กระเบื้องไทย อิฐดี สีธรรมชาติ">KRABUENG-PYK.COM</a> - All Rights Reserved</div>
            <!--/Copyright-->

            <div class="span6">
                <ul class="social pull-right">
                    <li><a href="https://www.facebook.com/RuayZaa"><i class="icon-facebook"></i></a></li>
                    <li><a href="#"><i class="icon-twitter"></i></a></li>
                    <li><a href="#"><i class="icon-pinterest"></i></a></li>
                    <li><a href="#"><i class="icon-linkedin"></i></a></li>
                    <li><a href="#"><i class="icon-google-plus"></i></a></li>                       
                    <li><a href="#"><i class="icon-youtube"></i></a></li>
                    <li><a href="#"><i class="icon-tumblr"></i></a></li>                        
                    <li><a href="#"><i class="icon-dribbble"></i></a></li>
                    <li><a href="#"><i class="icon-rss"></i></a></li>
                    <li><a href="#"><i class="icon-github-alt"></i></a></li>
                    <li><a href="#"><i class="icon-instagram"></i></a></li>                   
                </ul>
            </div>

            <div class="span1">
                <a id="gototop" class="gototop pull-right" href="#"><i class="icon-angle-up"></i></a>
            </div>
            <!--/Goto Top-->
        </div>
    </div>
</footer>
<!--/Footer-->
<script src="js/vendor/jquery-1.9.1.min.js"></script>
<script src="js/vendor/bootstrap.min.js"></script>
<script src="js/main.js"></script>
<!-- Required javascript files for Slider -->
<script src="js/jquery.ba-cond.min.js"></script>
<script src="js/jquery.slitslider.js"></script>
<!-- /Required javascript files for Slider -->

<!-- SL Slider -->
<script type="text/javascript"> 

</script>
<!-- /SL Slider -->
<!-- data table -->
	  <link rel="stylesheet" href="../css/datatable.css">
    <link rel="stylesheet" href="../css/ui-lightness/jquery-ui-1.10.3.custom.css">
	<script src="../js/jquery.min.js"></script>
     <script src="../js/datatable.js"></script>
	   <script src="../js/framework.js"></script>
	    <script src="../js/jquery-ui.js"></script>
		
	<!-- end data table -->
</body>
</html>